<%@include file="/header/head.jsp" %>
<jsp:include page="/header/header.jsp">
	<jsp:param value="" name="title"/>
</jsp:include>


<!-- end of menu_wrapper -->
<div id="content">
<a href="<spring:url value='/' />"> Home </a><br/>
<a href="<spring:url value='/users/edit' />"> Create New User </a><br/>
<a href="<c:url value="/j_spring_security_logout" />">Logout</a><br/>

<table width="80%" border="1" cellspacing="0" cellpadding="5">
       <tr>
           <th>No</th>
           <th>User Name</th>
           <th>Password</th>
           <th>First Name</th>
           <th>Last Name</th>
           <th>Role</th>
           <th>&nbsp;</th>
       </tr>
       <c:choose>
           <c:when test="${entities != null}">
               <c:forEach var="user" items="${entities}" varStatus="counter">
                   <tr>
                       <td>${counter.index + 1}</td>
                       <td>${user.userName}</td>
                       <td>${user.password}</td>
                       <td>${user.userDetail.firstName}</td>
                       <td>${user.userDetail.lastName}</td>
                       <td>${user.authorities.roleName}</td>
                        <td><div align="center"><a href="<spring:url value='/users/edit' />?id=${user.id}">Edit</a> /
                           <a href="<spring:url value='/users/delete'/>?id=${user.id}">Delete</a></div>
                       </td>
                   </tr>
               </c:forEach>
           </c:when>
       </c:choose>
</table>


</div>
 
 <%@include file="/footer/footer.jsp" %>